Skip to content

Add sequential buy test helper#382

Merged
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
kitWarse:test/366-sequential-buy-helper
May 31, 2026
Merged

Add sequential buy test helper#382
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
kitWarse:test/366-sequential-buy-helper

Conversation

@kitWarse
Copy link
Copy Markdown
Contributor

Summary

  • Adds a shared creator-keys integration test helper for sequential buys. The helper performs a caller-defined number of buys, starts from a provided payment amount, increments each subsequent payment by a provided step, and returns the resulting creator/holder state snapshot.
  • Updates existing buy quote monotonicity tests to use the shared helper and assert the cumulative supply and buyer key balance after each helper-driven sequence.

Issue

Changes

  • Added perform_incrementing_buys to creator-keys/tests/contract_test_env/mod.rs.
  • Replaced the local buy_n helper in buy_quote_monotonicity.rs with the shared incrementing helper.
  • Added assertions for helper-driven cumulative supply, buyer balance, and emitted buy event payment values to confirm the incrementing sequence.

Validation

  • Ran cargo fmt.
  • Ran git diff --check.
  • Ran cargo test -p creator-keys test_buy_quote_price_unchanged_after_five_buys but compilation could not proceed because this Windows environment is missing the MSVC linker link.exe before repo code was compiled.

Notes

  • The test failure appears environment-related: Rust MSVC targets require Visual Studio Build Tools with the C++ linker installed.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 31, 2026

@kitWarse Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@kitWarse kitWarse force-pushed the test/366-sequential-buy-helper branch 2 times, most recently from be90181 to 42ea02e Compare May 31, 2026 12:42
@kitWarse kitWarse force-pushed the test/366-sequential-buy-helper branch from 42ea02e to d672e86 Compare May 31, 2026 12:45
@Chucks1093 Chucks1093 merged commit d5e8a2b into accesslayerorg:main May 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add helper for building a buy sequence fixture with incrementing amounts

2 participants